home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / ModCreateSurfacesMenu.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  10.3 KB  |  401 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. // Alias|Wavefront Script File
  19. // MODIFY THIS AT YOUR OWN RISK
  20. //
  21. // Creation Date:  13 April 1997
  22. // Author:         gf
  23. //
  24. //
  25. //  Procedure Name:
  26. //      ModCurveSurfacesMenu
  27. //
  28. //  Description:
  29. //        Create the MODELLING->CurveSurfaces menu
  30. //
  31. //  Input Arguments:
  32. //      parent to parent the menu to.
  33. //
  34. //  Return Value:
  35. //      None.
  36. //
  37.  
  38. proc modCreateSurfacesMenuLabels()
  39. {
  40.     if( `optionVar -q modelWithToolRevolve` ) {
  41.         menuItem -e
  42.           -l "Revolve Tool"
  43.           -annotation ("Revolve Tool: Select " +
  44.                        "curve(s), isoparm(s) or trim edge(s)")
  45.           surfRevolveItem;
  46.         menuItem -e
  47.           -annotation ("Revolve Tool Option Box")
  48.           -l ("Revolve Tool Option Box")
  49.           revolveDialogItem;
  50.     }
  51.     else {
  52.         menuItem -e
  53.           -l "Revolve"
  54.           -annotation ("Revolve: Select " +
  55.                        "curve(s), isoparm(s) or trim edge(s)")
  56.           surfRevolveItem;
  57.         menuItem -e
  58.           -annotation ("Revolve Option Box")
  59.           -l ("Revolve Option Box")
  60.           revolveDialogItem;
  61.     }
  62.  
  63.     if( `optionVar -q modelWithToolLoft` ) {
  64.         menuItem -e
  65.           -l "Loft Tool"
  66.           -annotation ("Loft Tool: Select curve(s), " +
  67.                        "isoparm(s) or trim edge(s)")
  68.           surfLoftItem;
  69.         menuItem -e
  70.           -annotation ("Loft Tool Option Box")
  71.           -l ("Loft Tool Option Box")
  72.           loftDialogItem;
  73.     }
  74.     else {
  75.         menuItem -e
  76.           -l "Loft"
  77.           -annotation ("Loft: Select curve(s), " +
  78.                        "isoparm(s) or trim edge(s)")
  79.           surfLoftItem;
  80.         menuItem -e
  81.           -annotation ("Loft Option Box")
  82.           -l ("Loft Option Box")
  83.           loftDialogItem;
  84.     }
  85.  
  86.     if( `optionVar -q modelWithToolExtrude` ) {
  87.         menuItem -e
  88.           -l "Extrude Tool"
  89.           -annotation ("Extrude Tool: Select curve(s), " +
  90.                        "isoparm(s) or trim edge(s).  Select the path last.")
  91.           surfExtrudeItem;
  92.         menuItem -e
  93.           -annotation ("Extrude Tool Option Box")
  94.           -l ("Extrude Tool Option Box")
  95.           extrudeDialogItem;
  96.     }
  97.     else {
  98.         menuItem -e
  99.           -l "Extrude"
  100.           -annotation ("Extrude: Select curve(s), " +
  101.                        "isoparm(s) or trim edge(s).  Select the path last.")
  102.           surfExtrudeItem;
  103.         menuItem -e
  104.           -annotation ("Extrude Option Box")
  105.           -l ("Extrude Option Box")
  106.           extrudeDialogItem;
  107.     }
  108.  
  109.     if( `optionVar -q modelWithToolBoundary` ) {
  110.         menuItem -e
  111.           -l "Boundary Tool"
  112.           -annotation ("Boundary Tool: Select 3 or 4 " +
  113.                        "curves, isoparms or trim edges")
  114.           surfBoundaryItem;
  115.         menuItem -e
  116.           -annotation ("Boundary Tool Option Box")
  117.           -l ("Boundary Tool Option Box")
  118.           boundaryDialogItem;
  119.     }
  120.     else {
  121.         menuItem -e
  122.           -l "Boundary"
  123.           -annotation ("Boundary: Select 3 or 4 " +
  124.                        "curves, isoparms or trim edges")
  125.           surfBoundaryItem;
  126.         menuItem -e
  127.           -annotation ("Boundary Option Box")
  128.           -l ("Boundary Option Box")
  129.           boundaryDialogItem;
  130.     }
  131.  
  132.     if( `licenseCheck -m edit -type model` ) {
  133.         if( `optionVar -q modelWithToolSquareSrf` ) {
  134.             menuItem -e
  135.               -l "Square Tool"
  136.               -annotation ("Square Surface Tool" +
  137.                          ": Select 3 or 4 curves, isoparms or trim edges " +
  138.                          "(order of selection is important)" )
  139.               surfSquareItem;
  140.             menuItem -e
  141.               -annotation ("Square Surface Tool Option Box")
  142.               -l ("Square Surface Tool Option Box")
  143.               squareDialogItem;
  144.         }
  145.         else {
  146.             menuItem -e
  147.               -l "Square"
  148.               -annotation ("Square Surface" +
  149.                          ": Select 3 or 4 curves, isoparms or trim edges " +
  150.                          "(order of selection is important)" )
  151.               surfSquareItem;
  152.             menuItem -e
  153.               -annotation ("Square Surface Option Box")
  154.               -l ("Square Surface Option Box")
  155.               squareDialogItem;
  156.         }
  157.     }
  158.  
  159.     if( `optionVar -q modelWithToolBevel` ) {
  160.         menuItem -e
  161.           -l "Bevel Tool" 
  162.           -annotation ("Bevel Tool: Select curve(s), isoparm(s) " +
  163.                        "or trim edge(s) or CoS")
  164.           surfBevelItem;
  165.         menuItem -e
  166.           -annotation "Bevel Tool Option Box"
  167.           -l "Bevel Tool Option Box"
  168.           bevelDialogItem;
  169.     }
  170.     else {
  171.         menuItem -e
  172.           -l "Bevel" 
  173.           -annotation ("Bevel: Select curve(s), isoparm(s) " +
  174.                        "or trim edge(s) or CoS")
  175.           surfBevelItem;
  176.         menuItem -e
  177.           -annotation "Bevel Option Box"
  178.           -l "Bevel Option Box"
  179.           bevelDialogItem;
  180.     }
  181.  
  182.     if( `optionVar -q modelWithToolBevelPlus` ) {
  183.         menuItem -e
  184.           -l "Bevel Plus Tool" 
  185.           -annotation ("Bevel Plus Tool: Select curve(s), isoparm(s) " +
  186.                        "or trim edge(s) or CoS")
  187.           surfBevelPlusItem;
  188.         menuItem -e
  189.           -annotation "Bevel Plus Tool Option Box"
  190.           -l "Bevel Plus Tool Option Box"
  191.           bevelPlusDialogItem;
  192.     }
  193.     else {
  194.         menuItem -e
  195.           -l "Bevel Plus" 
  196.           -annotation ("Bevel Plus: Select curve(s), isoparm(s) " +
  197.                        "or trim edge(s) or CoS")
  198.           surfBevelPlusItem;
  199.         menuItem -e
  200.           -annotation "Bevel Plus Option Box"
  201.           -l "Bevel Plus Option Box"
  202.           bevelPlusDialogItem;
  203.     }
  204.  
  205.     if( `optionVar -q modelWithToolPlanar` ) {
  206.         menuItem -e
  207.             -l "Planar Tool"
  208.             -annotation ("Planar Tool: Select curve(s), isoparm(s) or " +
  209.                          "trim edge(s) (that together form one or more " +
  210.                          "closed regions)")
  211.             planarTrimItem;
  212.         menuItem -e
  213.             -annotation "Planar Tool Option Box"
  214.             -l "Planar Tool Option Box"
  215.             planerTrimDialogItem;
  216.     }
  217.     else {
  218.         menuItem -e
  219.             -l "Planar"
  220.             -annotation ("Planar: Select curve(s), isoparm(s) or " +
  221.                          "trim edge(s) (that together form one or more " +
  222.                          "closed regions)")
  223.             planarTrimItem;
  224.         menuItem -e
  225.             -annotation "Planar Option Box"
  226.             -l "Planar Option Box"
  227.             planerTrimDialogItem;
  228.     }
  229. }
  230.  
  231. global proc ModCreateSurfacesMenu( string $parent )
  232. {
  233.     // If this ever changes to true, we have to make sure
  234.     // we don't dim the tools.  So, don't just change the
  235.     // value.  Milan S.
  236.     int $dimWhenNoSelect = 0;
  237.  
  238.     setParent -m $parent;
  239.     if( `menu -q -ni $parent` != 0 ) {
  240.         //
  241.         //    Menu is built already - relabel and return
  242.         //
  243.         modCreateSurfacesMenuLabels();
  244.         return;
  245.     }
  246.  
  247.     // revolve + loft + planar.
  248.     //
  249.     menuItem
  250.       -c "Revolve"
  251.       -dmc "revolveToolScript 2"
  252.       -i "revolve.xpm"
  253.       surfRevolveItem;
  254.     menuItem -optionBox true
  255.       -c "RevolveOptions"
  256.       -i "revolve.xpm"
  257.       revolveDialogItem;
  258.     if( $dimWhenNoSelect )
  259.         dimWhen -f "SomethingSelected" ($parent+"|surfRevolveItem") ;
  260.  
  261.     menuItem
  262.       -c "Loft"
  263.       -dmc "loftToolScript 2"
  264.       -i "skin.xpm"
  265.       surfLoftItem;
  266.     menuItem -optionBox true 
  267.       -c "LoftOptions"
  268.       -i "skin.xpm"
  269.       loftDialogItem;
  270.     if( $dimWhenNoSelect )
  271.         dimWhen -f "SomethingSelected" ($parent+"|surfLoftItem") ;
  272.  
  273.     menuItem 
  274.         -c "Planar"
  275.         -dmc "planarToolScript 2"
  276.         -i "planarTrim.xpm"
  277.         planarTrimItem;
  278.     menuItem -optionBox true -i "planarTrim.xpm"
  279.         -c "PlanarOptions"
  280.         planerTrimDialogItem;
  281.  
  282.     menuItem -d true ;
  283.  
  284.     // extrude and Birail
  285.     //
  286.     menuItem
  287.       -c "Extrude"
  288.       -dmc "extrudeToolScript 2"
  289.       -i "extrude.xpm"
  290.       surfExtrudeItem;
  291.     menuItem -optionBox true 
  292.       -c "ExtrudeOptions"
  293.       -i "extrude.xpm"
  294.       extrudeDialogItem;
  295.     if( $dimWhenNoSelect )
  296.         dimWhen -f "SomethingSelected" ($parent+"|surfExtrudeItem") ;
  297.  
  298.     menuItem -l "Birail" -sm 1 -to 1 -aob true;
  299.  
  300.         menuItem -l "Birail 1 Tool" 
  301.           -c "Birail1"
  302.           -dmc "birailToolScript 2 1"
  303.           -annotation ("Birail 1 Tool: Select curve(s), " +
  304.                        "isoparm(s) or trim edge(s)")
  305.           -image "birail1Gen.xpm"
  306.           spBirailItem;
  307.         menuItem -optionBox true -image "birail1Gen.xpm"
  308.             -annotation "Birail 1 Tool Option Box"
  309.             -l "Birail 1 Tool Option Box"
  310.             -c "Birail1Options"
  311.             birail1ToolDialog;
  312.  
  313.         menuItem -l "Birail 2 Tool" 
  314.           -c "Birail2"
  315.           -dmc "birailToolScript 2 2"
  316.           -annotation ("Birail 2 Tool: Select curve(s), " +
  317.                        "isoparm(s) or trim edge(s)")
  318.           -image "birail2Gen.xpm"
  319.           dpBirailItem;
  320.         menuItem -optionBox true -image "birail2Gen.xpm"
  321.             -annotation "Birail 2 Tool Option Box"
  322.             -l "Birail 2 Tool Option Box"
  323.             -c "Birail2Options"
  324.             birail2ToolDialog;
  325.  
  326.         menuItem -l "Birail 3+ Tool" 
  327.           -c "Birail3"
  328.           -dmc "birailToolScript 2 3"
  329.           -annotation ("Birail 3+ Tool: Select curve(s), " +
  330.                        "isoparm(s) or trim edge(s)")
  331.           -image "birail3Gen.xpm"
  332.           mpBirailItem;
  333.         menuItem -optionBox true -image "birail3Gen.xpm"
  334.             -annotation "Birail 3+ Tool Option Box"
  335.             -l "Birail 3+ Tool Option Box"
  336.             -c "Birail3Options"
  337.             birail3ToolDialog;
  338.     setParent -m .. ;
  339.     menuItem -d true ;
  340.  
  341.     // boundary + Square.
  342.     //    
  343.     menuItem
  344.         -c "Boundary"
  345.         -dmc "boundaryToolScript 2"
  346.         -i "boundary.xpm"
  347.         surfBoundaryItem;
  348.     menuItem -optionBox true
  349.         -c "BoundaryOptions"
  350.         -i "boundary.xpm"
  351.         boundaryDialogItem;
  352.     if( $dimWhenNoSelect )
  353.         dimWhen -f "SomethingSelected" ($parent+"|surfBoundaryItem") ;
  354.  
  355.     if( `licenseCheck -m edit -type model` ) {
  356.         menuItem
  357.             -c "SquareSurface"
  358.             -dmc "squareSrfToolScript 2"
  359.             -i "squareSrf.xpm"
  360.             surfSquareItem;
  361.         menuItem -optionBox true
  362.             -c "SquareSurfaceOptions"
  363.             -i "squareSrf.xpm"
  364.             squareDialogItem;
  365.         if( $dimWhenNoSelect )
  366.             dimWhen -f "SomethingSelected" ($parent+"|surfSquareItem") ;
  367.  
  368.         menuItem -d true ;
  369.     }
  370.  
  371.     // bevel.
  372.     //
  373.     menuItem -l "Bevel" 
  374.       -c "Bevel"
  375.       -dmc "bevelToolScript 2"
  376.       -i "bevel.xpm"
  377.       surfBevelItem;
  378.     menuItem -optionBox true 
  379.       -c "BevelOptions"
  380.       -i "bevel.xpm"
  381.       bevelDialogItem;
  382.     if( $dimWhenNoSelect )
  383.         dimWhen -f "SomethingSelected" ($parent+"|surfBevelItem") ;
  384.  
  385.     // bevel.
  386.     //
  387.     menuItem -l "Bevel Plus" 
  388.       -c "BevelPlus"
  389.       -dmc "bevelPlusToolScript 2"
  390.       -i "bevelPlus.xpm"
  391.       surfBevelPlusItem;
  392.     menuItem -optionBox true 
  393.       -c "BevelPlusOptions"
  394.       -i "bevelPlus.xpm"
  395.       bevelPlusDialogItem;
  396.     if( $dimWhenNoSelect )
  397.         dimWhen -f "SomethingSelected" ($parent+"|surfBevelPlusItem") ;
  398.  
  399.     modCreateSurfacesMenuLabels();
  400. }
  401.